<?php
    /*
     * This example demonstrates how to autoload an mixin through an
     * explicit method invocation.
     
     * Extension methods are prefixed with their corresponding mixin key.  
     * As such, if an mixin method is invoked and the mixin is not already
     * added to the extended object, it will try to automatically load the 
     * mixin from the list of registered mixins.
     *
     * @author Walter Badillo
     */
     
    require dirname(__FILE__) . DIRECTORY_SEPARATOR . '_include.php';
    
    try {
        
        echo "\n";
        
        $obj = new ClassStructure_Mixin_Delegator();
        
        echo "Test: Invoke an mixin method, without adding the corresponding mixin first" . "\n";
        echo '---------------------------------------------------------' . "\n\n";
        
        echo 'ClassStructure_Property::setProperty' . "\n";
        $obj->property__setProperty('one', 1);
        
        $mix = $obj->property__getProperty('one');
        echo '  - set property named [one] with the value [' . $mix . '].' . "\n";
        
        echo "\n\n";
        
        //----------------------------------------------------------------------
        // Expose structure
        
        echo ClassStructure_UtilityFunctions::getObjectSignature($obj);
        
    } catch (Exception $obj_exception) {
        print_r($obj_exception);
    }
    
?>
